dot product and cross product of vectors